import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
// 引入路由
import router from './router/index'
//  引入element-plus
import ElementPlus from 'element-plus'
// 引入 pinia
import { createPinia } from 'pinia'
const pinia = createPinia()
// 引入图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
// 引入中文语言包
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'

// 全局注册组件
import panelHead from './components/head/panelHead.vue'

const app = createApp(App)
// 全局注册图标`
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.component('panelHead', panelHead)

app.use(router).use(pinia).use(ElementPlus, {
  locale: zhCn, // 设置语言为中文
}).mount('#app')
